home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3c / mbchar.z / mbchar
Text File  |  1998-10-20  |  7KB  |  133 lines

  1.  
  2.  
  3.  
  4. mmmmbbbbcccchhhhaaaarrrr((((3333CCCC))))                                                          mmmmbbbbcccchhhhaaaarrrr((((3333CCCC))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _mmmm_bbbb_cccc_hhhh_aaaa_rrrr: _mmmm_bbbb_tttt_oooo_wwww_cccc, _mmmm_bbbb_llll_eeee_nnnn, _wwww_cccc_tttt_oooo_mmmm_bbbb - multibyte character handling
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_tttt_dddd_llll_iiii_bbbb_...._hhhh_>>>>
  13.  
  14.      _iiii_nnnn_tttt _mmmm_bbbb_tttt_oooo_wwww_cccc _((((_wwww_cccc_hhhh_aaaa_rrrr______tttt _****_pppp_wwww_cccc_,,,, _cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_ssss_,,,, _ssss_iiii_zzzz_eeee______tttt _nnnn_))))_;;;;
  15.  
  16.      _iiii_nnnn_tttt _mmmm_bbbb_llll_eeee_nnnn _((((_cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_ssss_,,,, _ssss_iiii_zzzz_eeee______tttt _nnnn_))))_;;;;
  17.  
  18.      _iiii_nnnn_tttt _wwww_cccc_tttt_oooo_mmmm_bbbb _((((_cccc_hhhh_aaaa_rrrr _****_ssss_,,,, _wwww_cccc_hhhh_aaaa_rrrr______tttt _wwww_cccc_hhhh_aaaa_rrrr_))))_;;;;
  19.  
  20. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  21.      Multibyte characters are used to represent characters in an extended
  22.      character set.  This is needed for locales where 8 bits are not enough to
  23.      represent all the characters in the character set.
  24.  
  25.      The multibyte character handling functions provide the means of
  26.      translating multibyte characters into wide characters and back again.
  27.      Wide characters have type _wwww_cccc_hhhh_aaaa_rrrr______tttt (defined in _ssss_tttt_dddd_llll_iiii_bbbb_...._hhhh), which is an
  28.      integral type whose range of values can represent distinct codes for all
  29.      members of the largest extended character set specified among the
  30.      supported locales.
  31.  
  32.      A maximum of 3 extended character sets are supported for each locale.
  33.      The number of bytes in an extended character set is defined by the
  34.      _LLLL_CCCC______CCCC_TTTT_YYYY_PPPP_EEEE category of the locale [see _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee(3C)].  However, the
  35.      maximum number of bytes in any multibyte character will never be greater
  36.      than _MMMM_BBBB______LLLL_EEEE_NNNN______MMMM_AAAA_XXXX.  which is defined in _llll_iiii_mmmm_iiii_tttt_ssss_...._hhhh.  The maximum number of
  37.      bytes in a character in an extended character set in the _cccc_uuuu_rrrr_rrrr_eeee_nnnn_tttt locale
  38.      is given by the macro, _MMMM_BBBB______CCCC_UUUU_RRRR______MMMM_AAAA_XXXX, also defined in _ssss_tttt_dddd_llll_iiii_bbbb_...._hhhh.
  39.  
  40.      _mmmm_bbbb_tttt_oooo_wwww_cccc determines the number of bytes that comprise the multibyte
  41.      character pointed to by _s.  Also, if _p_w_c is not a null pointer, _mmmm_bbbb_tttt_oooo_wwww_cccc
  42.      converts the multibyte character to a wide character and places the
  43.      result in the object pointed to by _p_w_c. (The value of the wide character
  44.      corresponding to the null character is zero.)  At most _n characters will
  45.      be examined, starting at the character pointed to by _s.
  46.  
  47.      If _s is a null pointer, _mmmm_bbbb_tttt_oooo_wwww_cccc simply returns 0.  If _s is not a null
  48.      pointer, then, if _s points to the null character, _mmmm_bbbb_tttt_oooo_wwww_cccc returns 0; if
  49.      the next _n or fewer bytes form a valid multibyte character, _mmmm_bbbb_tttt_oooo_wwww_cccc
  50.      returns the number of bytes that comprise the converted multibyte
  51.      character; otherwise, _s does not point to a valid multibyte character and
  52.      _mmmm_bbbb_tttt_oooo_wwww_cccc returns -1.
  53.  
  54.      _mmmm_bbbb_llll_eeee_nnnn determines the number of bytes comprising the multibyte character
  55.      pointed to by _s.  It is equivalent to
  56.  
  57.           mbtowc ((wchar_t *)0, s, n);
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. mmmmbbbbcccchhhhaaaarrrr((((3333CCCC))))                                                          mmmmbbbbcccchhhhaaaarrrr((((3333CCCC))))
  71.  
  72.  
  73.  
  74.      _wwww_cccc_tttt_oooo_mmmm_bbbb determines the number of bytes needed to represent the multibyte
  75.      character corresponding to the code whose value is _w_c_h_a_r, and, if _s is
  76.      not a null pointer, stores the multibyte character representation in the
  77.      array pointed to by _s.  At most _MMMM_BBBB______CCCC_UUUU_RRRR______MMMM_AAAA_XXXX characters are stored.
  78.  
  79.      If _s is a null pointer, _wwww_cccc_tttt_oooo_mmmm_bbbb simply returns 0.  If _s is not a null
  80.      pointer, _wwww_cccc_tttt_oooo_mmmm_bbbb returns -1 if the value of _w_c_h_a_r does not correspond to a
  81.      valid multibyte character; otherwise it returns the number of bytes that
  82.      comprise the multibyte character corresponding to the value of _w_c_h_a_r.
  83.  
  84. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  85.      _wwww_cccc_hhhh_rrrr_tttt_bbbb_llll(1M), _mmmm_bbbb_ssss_tttt_rrrr_iiii_nnnn_gggg(3C), _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee(3C), _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5).
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.